import React from 'react'
import { Icon } from 'antd'
import { Popconfirm } from 'antd'

class CollectNode extends React.Component {
    confirm(e) {
        console.log(e)
    }

    cancel(e) {
        console.log(e)
    }

    render() {
        return (
            <span>
                <span className="collect-do"><Icon type="star" />收藏中</span>
                <span className="CollectNode" title="点击">
                    <Popconfirm title="你确定取消收藏？" onConfirm={(e) => this.confirm(e)} onCancel={(e) => this.cancel(e)}
                        okText="是" cancelText="否">
                        <span className="collect-status">选择状态</span>
                    </Popconfirm>
                </span>
                <style jsx>{`
                    .CollectNode {
                        cursor: pointer;
                    }
                    .collect-do {
                        margin: 0 8px 0 10px;
                    }
                    .collect-status {
                        margin: 0 0 0 5px;
                        font-size: 14px;
                    }
                `}</style>
            </span>
        )
    }
}

export default CollectNode